﻿
<%@ Page Language="C#" Theme="Default" MasterPageFile="~/MasterPages/admin.master" AutoEventWireup="true"  CodeFile="NhomSanPhamEdit.aspx.cs" Inherits="NhomSanPhamEdit" Title="NhomSanPham Edit" %>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">Nhom San Pham - Add/Edit</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
		<data:MultiFormView ID="FormView1" DataKeyNames="NhomSanPhamId" runat="server" DataSourceID="NhomSanPhamDataSource">
		
			<EditItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/NhomSanPhamFields.ascx" />
			</EditItemTemplatePaths>
		
			<InsertItemTemplatePaths>
				<data:TemplatePath Path="~/Admin/UserControls/NhomSanPhamFields.ascx" />
			</InsertItemTemplatePaths>
		
			<EmptyDataTemplate>
				<b>NhomSanPham not found!</b>
			</EmptyDataTemplate>
			
			<FooterTemplate>
				<asp:Button ID="InsertButton" runat="server" CausesValidation="True" CommandName="Insert" Text="Insert" />
				<asp:Button ID="UpdateButton" runat="server" CausesValidation="True" CommandName="Update" Text="Update" />
				<asp:Button ID="CancelButton" runat="server" CausesValidation="False" CommandName="Cancel" Text="Cancel" />
			</FooterTemplate>

		</data:MultiFormView>
		
		<data:NhomSanPhamDataSource ID="NhomSanPhamDataSource" runat="server"
			SelectMethod="GetByNhomSanPhamId"
		>
			<Parameters>
				<asp:QueryStringParameter Name="NhomSanPhamId" QueryStringField="NhomSanPhamId" Type="String" />

			</Parameters>
		</data:NhomSanPhamDataSource>
		
		<br />

		<data:EntityGridView ID="GridViewChietKhauDoanhSo" runat="server"
			AutoGenerateColumns="False"					
			OnSelectedIndexChanged="GridViewChietKhauDoanhSo_SelectedIndexChanged"			 			 
			DataSourceID="ChietKhauDoanhSoDataSource"
			DataKeyNames="ChietKhauDsid"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_ChietKhauDoanhSo.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="DoanhSo" HeaderText="Doanh So" SortExpression="DoanhSo" />				
				<asp:BoundField DataField="MucThuong" HeaderText="Muc Thuong" SortExpression="MucThuong" />				
				<asp:BoundField DataField="ChuongTrinhId" HeaderText="Chuong Trinh Id" SortExpression="ChuongTrinhID" />				
				<asp:BoundField DataField="LastUpdate" HeaderText="Last Update" SortExpression="LastUpdate" />				
				<asp:BoundField DataField="UpdateBy" HeaderText="Update By" SortExpression="UpdateBy" />				
				<asp:BoundField DataField="ToanTuSoSanh" HeaderText="Toan Tu So Sanh" SortExpression="ToanTuSoSanh" />				
			</Columns>
			<EmptyDataTemplate>
				<b>No Chiet Khau Doanh So Found! </b>
				<asp:HyperLink runat="server" ID="hypChietKhauDoanhSo" NavigateUrl="~/admin/ChietKhauDoanhSoEdit.aspx">Add New</asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:ChietKhauDoanhSoDataSource ID="ChietKhauDoanhSoDataSource" runat="server" SelectMethod="Find">
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:ChietKhauDoanhSoFilter  Column="NhomSanPhamId" QueryStringField="NhomSanPhamId" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:ChietKhauDoanhSoDataSource>		
		
		<br />
		<data:EntityGridView ID="GridViewChietKhauNhanh" runat="server"
			AutoGenerateColumns="False"					
			OnSelectedIndexChanged="GridViewChietKhauNhanh_SelectedIndexChanged"			 			 
			DataSourceID="ChietKhauNhanhDataSource"
			DataKeyNames="ChietKhauNhanhId"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_ChietKhauNhanh.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="MucThuong" HeaderText="Muc Thuong" SortExpression="MucThuong" />				
				<asp:BoundField DataField="LastUpdate" HeaderText="Last Update" SortExpression="LastUpdate" />				
				<asp:BoundField DataField="UpdateBy" HeaderText="Update By" SortExpression="UpdateBy" />				
			</Columns>
			<EmptyDataTemplate>
				<b>No Chiet Khau Nhanh Found! </b>
				<asp:HyperLink runat="server" ID="hypChietKhauNhanh" NavigateUrl="~/admin/ChietKhauNhanhEdit.aspx">Add New</asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:ChietKhauNhanhDataSource ID="ChietKhauNhanhDataSource" runat="server" SelectMethod="Find">
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:ChietKhauNhanhFilter  Column="NhomSanPhamId" QueryStringField="NhomSanPhamId" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:ChietKhauNhanhDataSource>		
		
		<br />
		<data:EntityGridView ID="GridViewChietKhauSanPham" runat="server"
			AutoGenerateColumns="False"					
			OnSelectedIndexChanged="GridViewChietKhauSanPham_SelectedIndexChanged"			 			 
			DataSourceID="ChietKhauSanPhamDataSource"
			DataKeyNames="ChietKhauSpid"
			AllowMultiColumnSorting="false"
			DefaultSortColumnName="" 
			DefaultSortDirection="Ascending"	
			ExcelExportFileName="Export_ChietKhauSanPham.xls"  		
			Visible='<%# (FormView1.DefaultMode == FormViewMode.Insert) ? false : true %>'	
			>
			<Columns>
				<asp:CommandField ShowSelectButton="True" />
				<asp:BoundField DataField="SoLuong" HeaderText="So Luong" SortExpression="SoLuong" />				
				<asp:BoundField DataField="MucThuong" HeaderText="Muc Thuong" SortExpression="MucThuong" />				
				<asp:BoundField DataField="LoaiThuong" HeaderText="Loai Thuong" SortExpression="LoaiThuong" />				
				<asp:BoundField DataField="LastUpdate" HeaderText="Last Update" SortExpression="LastUpdate" />				
				<asp:BoundField DataField="UpdateBy" HeaderText="Update By" SortExpression="UpdateBy" />				
				<asp:BoundField DataField="HinhThucThuong" HeaderText="Hinh Thuc Thuong" SortExpression="HinhThucThuong" />				
			</Columns>
			<EmptyDataTemplate>
				<b>No Chiet Khau San Pham Found! </b>
				<asp:HyperLink runat="server" ID="hypChietKhauSanPham" NavigateUrl="~/admin/ChietKhauSanPhamEdit.aspx">Add New</asp:HyperLink>
			</EmptyDataTemplate>
		</data:EntityGridView>					
		
		<data:ChietKhauSanPhamDataSource ID="ChietKhauSanPhamDataSource" runat="server" SelectMethod="Find">
		    <Parameters>
				<data:SqlParameter Name="Parameters">
					<Filters>
						<data:ChietKhauSanPhamFilter  Column="NhomSanPhamId" QueryStringField="NhomSanPhamId" /> 
					</Filters>
				</data:SqlParameter>
				<data:CustomParameter Name="OrderByClause" Value="" ConvertEmptyStringToNull="false" /> 
		    </Parameters>
		</data:ChietKhauSanPhamDataSource>		
		
		<br />
		

</asp:Content>

